﻿using AutoMapper;
using DomainCommons.Models;
using IRepositories;
using System.Linq.Expressions;

namespace IApplicationServices.Helpers
{
    public interface IMapperHelp<T, TEntity, TApiEntity>
        where TEntity : class, IEntity<T>, new()
        where TApiEntity : class, IEntity<T>, new()
    {
        public IBaseRepository<T, TEntity> EntityRepository { get; }
        public IMapper Mapper { get; }
        Task<TEntity> MapToEntityAsync(TApiEntity apiBo, params Expression<Func<TEntity, object>>[] expressions);
        Task<List<TEntity>> MapToEntityListAsync(List<TApiEntity> apiBos, params Expression<Func<TEntity, object>>[] args);
    }
}
